import time

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.implicitly_wait(10)
driver.maximize_window()


# 固定资产台账增删改查
def login(url,username,password):
    # 打开地址
    driver.get(url)
    # 输入用户名密码
    driver.find_element(By.ID, 'username').send_keys(username)
    driver.find_element(By.ID, 'password').send_keys(password)
    driver.find_element(By.XPATH, '//button').click()
    time.sleep(5)
    return driver

# if __name__ == '__main__':
#     login('http://10.10.10.50:32060/','gzadmin','Gdjt@2021')
#     time.sleep(3)
